ifeq ($(strip $(targetbase)),linux)
ifeq ($(strip $(LINUX_LK)),TRUE)
include $(SDK_DIR)/mk/sys_km.mk
# cli lib
SDK_CLI_LIB_SRCS = $(shell find $(SDK_DIR)/libctccli/src -name "*.c")
SDK_CLI_LIB_OBJS = $(patsubst %.c,%.o,$(SDK_CLI_LIB_SRCS))
SDK_CLI_LIB_OBJS := $(subst $(SDK_DIR)/libctccli/,,$(SDK_CLI_LIB_OBJS))

lib-m += $(SDK_CLI_LIB_OBJS)
else
include $(MK_DIR)/sys.mk
OBJ_DIR=$(OBJ_BASE_DIR)/libctccli
LIB = libctccli
SRCS =
SRCS += $(shell find src -name "*.c")

CFLAGS += -I$(SDK_DIR)/ctc_shell/

CPPFLAGS += -I$(SDK_DIR)/sal/include
CPPFLAGS += -I$(SDK_DIR)/core
CPPFLAGS += -I$(SDK_DIR)/libctccli/include
CPPFLAGS += -I$(SDK_DIR)/libctccli/src
CPPFLAGS += -I$(SDK_DIR)/libpktxr/include
CPPFLAGS += -I$(SDK_DIR)/libpktxr/src

include $(MK_DIR)/lib.mk
endif
endif

ifeq ($(strip $(targetbase)),vxworks)
OBJ_DIR=$(OBJ_BASE_DIR)/libctccli

all_targets = src libctccli

all: $(all_targets) FORCE
clean: $(addprefix clean_,$(all_targets)) FORCE

src: FORCE
	$(CTC_MAKE) -C $(SDK_DIR)/libctccli/src -f Makefile.vx

clean_src: FORCE
	$(CTC_MAKE) -C $(SDK_DIR)/libctccli/src -f Makefile.vx clean

libctccli: FORCE
	$(CTC_MAKE) -f Makefile_lib_ctccli.vx

clean_libctccli: FORCE
	$(CTC_MAKE) -f Makefile_lib_ctccli.vx clean

.PHONY: FORCE clean
FORCE:

endif
